from matplotlib import pyplot as plt
def draw_3d_p(ps):
    '''input list 3d p'''
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    x, y, z = zip(*ps)
    ax.scatter(x, y, z,c='red')
    for i, (xi, yi, zi) in enumerate(ps):
     ax.text(xi, yi, zi, str(i), size=10, zorder=1)

    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')
    ax.set_aspect('equal')
    # 显示图形
    plt.show()